//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension RAM {
    // MARK: Enums

    public enum ResourceOwner: String, CustomStringConvertible, Codable {
        case otherAccounts = "OTHER-ACCOUNTS"
        case `self` = "SELF"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareAssociationStatus: String, CustomStringConvertible, Codable {
        case associated = "ASSOCIATED"
        case associating = "ASSOCIATING"
        case disassociated = "DISASSOCIATED"
        case disassociating = "DISASSOCIATING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareAssociationType: String, CustomStringConvertible, Codable {
        case principal = "PRINCIPAL"
        case resource = "RESOURCE"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareFeatureSet: String, CustomStringConvertible, Codable {
        case createdFromPolicy = "CREATED_FROM_POLICY"
        case promotingToStandard = "PROMOTING_TO_STANDARD"
        case standard = "STANDARD"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareInvitationStatus: String, CustomStringConvertible, Codable {
        case accepted = "ACCEPTED"
        case expired = "EXPIRED"
        case pending = "PENDING"
        case rejected = "REJECTED"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case failed = "FAILED"
        case pending = "PENDING"
        public var description: String { return self.rawValue }
    }

    public enum ResourceStatus: String, CustomStringConvertible, Codable {
        case available = "AVAILABLE"
        case limitExceeded = "LIMIT_EXCEEDED"
        case pending = "PENDING"
        case unavailable = "UNAVAILABLE"
        case zonalResourceInaccessible = "ZONAL_RESOURCE_INACCESSIBLE"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AcceptResourceShareInvitationRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the invitation.
        public let resourceShareInvitationArn: String

        public init(clientToken: String? = nil, resourceShareInvitationArn: String) {
            self.clientToken = clientToken
            self.resourceShareInvitationArn = resourceShareInvitationArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitationArn
        }
    }

    public struct AcceptResourceShareInvitationResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Information about the invitation.
        public let resourceShareInvitation: ResourceShareInvitation?

        public init(clientToken: String? = nil, resourceShareInvitation: ResourceShareInvitation? = nil) {
            self.clientToken = clientToken
            self.resourceShareInvitation = resourceShareInvitation
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitation
        }
    }

    public struct AssociateResourceSharePermissionRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The ARN of the AWS RAM permission to associate with the resource share.
        public let permissionArn: String
        /// Indicates whether the permission should replace the permissions that are currently associated with the resource share. Use true to replace the current permissions. Use false to add the permission to the current permission.
        public let replace: Bool?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, permissionArn: String, replace: Bool? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.permissionArn = permissionArn
            self.replace = replace
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case permissionArn
            case replace
            case resourceShareArn
        }
    }

    public struct AssociateResourceSharePermissionResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Indicates whether the request succeeded.
        public let returnValue: Bool?

        public init(clientToken: String? = nil, returnValue: Bool? = nil) {
            self.clientToken = clientToken
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case returnValue
        }
    }

    public struct AssociateResourceShareRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The principals.
        public let principals: [String]?
        /// The Amazon Resource Names (ARN) of the resources.
        public let resourceArns: [String]?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, principals: [String]? = nil, resourceArns: [String]? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.principals = principals
            self.resourceArns = resourceArns
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case principals
            case resourceArns
            case resourceShareArn
        }
    }

    public struct AssociateResourceShareResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Information about the associations.
        public let resourceShareAssociations: [ResourceShareAssociation]?

        public init(clientToken: String? = nil, resourceShareAssociations: [ResourceShareAssociation]? = nil) {
            self.clientToken = clientToken
            self.resourceShareAssociations = resourceShareAssociations
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareAssociations
        }
    }

    public struct CreateResourceShareRequest: AWSEncodableShape {
        /// Indicates whether principals outside your AWS organization can be associated with a resource share.
        public let allowExternalPrincipals: Bool?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The name of the resource share.
        public let name: String
        /// The ARNs of the permissions to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type.
        public let permissionArns: [String]?
        /// The principals to associate with the resource share. The possible values are IDs of AWS accounts, the ARN of an OU or organization from AWS Organizations.
        public let principals: [String]?
        /// The Amazon Resource Names (ARN) of the resources to associate with the resource share.
        public let resourceArns: [String]?
        /// One or more tags.
        public let tags: [Tag]?

        public init(allowExternalPrincipals: Bool? = nil, clientToken: String? = nil, name: String, permissionArns: [String]? = nil, principals: [String]? = nil, resourceArns: [String]? = nil, tags: [Tag]? = nil) {
            self.allowExternalPrincipals = allowExternalPrincipals
            self.clientToken = clientToken
            self.name = name
            self.permissionArns = permissionArns
            self.principals = principals
            self.resourceArns = resourceArns
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case allowExternalPrincipals
            case clientToken
            case name
            case permissionArns
            case principals
            case resourceArns
            case tags
        }
    }

    public struct CreateResourceShareResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Information about the resource share.
        public let resourceShare: ResourceShare?

        public init(clientToken: String? = nil, resourceShare: ResourceShare? = nil) {
            self.clientToken = clientToken
            self.resourceShare = resourceShare
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShare
        }
    }

    public struct DeleteResourceShareRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "clientToken", location: .querystring(locationName: "clientToken")),
            AWSMemberEncoding(label: "resourceShareArn", location: .querystring(locationName: "resourceShareArn"))
        ]

        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteResourceShareResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Indicates whether the request succeeded.
        public let returnValue: Bool?

        public init(clientToken: String? = nil, returnValue: Bool? = nil) {
            self.clientToken = clientToken
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case returnValue
        }
    }

    public struct DisassociateResourceSharePermissionRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The ARN of the permission to disassociate from the resource share.
        public let permissionArn: String
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, permissionArn: String, resourceShareArn: String) {
            self.clientToken = clientToken
            self.permissionArn = permissionArn
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case permissionArn
            case resourceShareArn
        }
    }

    public struct DisassociateResourceSharePermissionResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Indicates whether the request succeeded.
        public let returnValue: Bool?

        public init(clientToken: String? = nil, returnValue: Bool? = nil) {
            self.clientToken = clientToken
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case returnValue
        }
    }

    public struct DisassociateResourceShareRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The principals.
        public let principals: [String]?
        /// The Amazon Resource Names (ARNs) of the resources.
        public let resourceArns: [String]?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, principals: [String]? = nil, resourceArns: [String]? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.principals = principals
            self.resourceArns = resourceArns
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case principals
            case resourceArns
            case resourceShareArn
        }
    }

    public struct DisassociateResourceShareResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Information about the associations.
        public let resourceShareAssociations: [ResourceShareAssociation]?

        public init(clientToken: String? = nil, resourceShareAssociations: [ResourceShareAssociation]? = nil) {
            self.clientToken = clientToken
            self.resourceShareAssociations = resourceShareAssociations
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareAssociations
        }
    }

    public struct EnableSharingWithAwsOrganizationRequest: AWSEncodableShape {
        public init() {}
    }

    public struct EnableSharingWithAwsOrganizationResponse: AWSDecodableShape {
        /// Indicates whether the request succeeded.
        public let returnValue: Bool?

        public init(returnValue: Bool? = nil) {
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case returnValue
        }
    }

    public struct GetPermissionRequest: AWSEncodableShape {
        /// The ARN of the permission.
        public let permissionArn: String
        /// The identifier for the version of the permission.
        public let permissionVersion: Int?

        public init(permissionArn: String, permissionVersion: Int? = nil) {
            self.permissionArn = permissionArn
            self.permissionVersion = permissionVersion
        }

        private enum CodingKeys: String, CodingKey {
            case permissionArn
            case permissionVersion
        }
    }

    public struct GetPermissionResponse: AWSDecodableShape {
        /// Information about the permission.
        public let permission: ResourceSharePermissionDetail?

        public init(permission: ResourceSharePermissionDetail? = nil) {
            self.permission = permission
        }

        private enum CodingKeys: String, CodingKey {
            case permission
        }
    }

    public struct GetResourcePoliciesRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The principal.
        public let principal: String?
        /// The Amazon Resource Names (ARN) of the resources.
        public let resourceArns: [String]

        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: String? = nil, resourceArns: [String]) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resourceArns = resourceArns
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case principal
            case resourceArns
        }
    }

    public struct GetResourcePoliciesResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// A key policy document, in JSON format.
        public let policies: [String]?

        public init(nextToken: String? = nil, policies: [String]? = nil) {
            self.nextToken = nextToken
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case policies
        }
    }

    public struct GetResourceShareAssociationsRequest: AWSEncodableShape {
        /// The association status.
        public let associationStatus: ResourceShareAssociationStatus?
        /// The association type. Specify PRINCIPAL to list the principals that are associated with the specified resource share. Specify RESOURCE to list the resources that are associated with the specified resource share.
        public let associationType: ResourceShareAssociationType
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The principal. You cannot specify this parameter if the association type is RESOURCE.
        public let principal: String?
        /// The Amazon Resource Name (ARN) of the resource. You cannot specify this parameter if the association type is PRINCIPAL.
        public let resourceArn: String?
        /// The Amazon Resource Names (ARN) of the resource shares.
        public let resourceShareArns: [String]?

        public init(associationStatus: ResourceShareAssociationStatus? = nil, associationType: ResourceShareAssociationType, maxResults: Int? = nil, nextToken: String? = nil, principal: String? = nil, resourceArn: String? = nil, resourceShareArns: [String]? = nil) {
            self.associationStatus = associationStatus
            self.associationType = associationType
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resourceArn = resourceArn
            self.resourceShareArns = resourceShareArns
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case associationStatus
            case associationType
            case maxResults
            case nextToken
            case principal
            case resourceArn
            case resourceShareArns
        }
    }

    public struct GetResourceShareAssociationsResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// Information about the associations.
        public let resourceShareAssociations: [ResourceShareAssociation]?

        public init(nextToken: String? = nil, resourceShareAssociations: [ResourceShareAssociation]? = nil) {
            self.nextToken = nextToken
            self.resourceShareAssociations = resourceShareAssociations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceShareAssociations
        }
    }

    public struct GetResourceShareInvitationsRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The Amazon Resource Names (ARN) of the resource shares.
        public let resourceShareArns: [String]?
        /// The Amazon Resource Names (ARN) of the invitations.
        public let resourceShareInvitationArns: [String]?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceShareArns: [String]? = nil, resourceShareInvitationArns: [String]? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceShareArns = resourceShareArns
            self.resourceShareInvitationArns = resourceShareInvitationArns
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceShareArns
            case resourceShareInvitationArns
        }
    }

    public struct GetResourceShareInvitationsResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// Information about the invitations.
        public let resourceShareInvitations: [ResourceShareInvitation]?

        public init(nextToken: String? = nil, resourceShareInvitations: [ResourceShareInvitation]? = nil) {
            self.nextToken = nextToken
            self.resourceShareInvitations = resourceShareInvitations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceShareInvitations
        }
    }

    public struct GetResourceSharesRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The name of the resource share.
        public let name: String?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The type of owner.
        public let resourceOwner: ResourceOwner
        /// The Amazon Resource Names (ARN) of the resource shares.
        public let resourceShareArns: [String]?
        /// The status of the resource share.
        public let resourceShareStatus: ResourceShareStatus?
        /// One or more tag filters.
        public let tagFilters: [TagFilter]?

        public init(maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil, resourceOwner: ResourceOwner, resourceShareArns: [String]? = nil, resourceShareStatus: ResourceShareStatus? = nil, tagFilters: [TagFilter]? = nil) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.resourceOwner = resourceOwner
            self.resourceShareArns = resourceShareArns
            self.resourceShareStatus = resourceShareStatus
            self.tagFilters = tagFilters
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case name
            case nextToken
            case resourceOwner
            case resourceShareArns
            case resourceShareStatus
            case tagFilters
        }
    }

    public struct GetResourceSharesResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// Information about the resource shares.
        public let resourceShares: [ResourceShare]?

        public init(nextToken: String? = nil, resourceShares: [ResourceShare]? = nil) {
            self.nextToken = nextToken
            self.resourceShares = resourceShares
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceShares
        }
    }

    public struct ListPendingInvitationResourcesRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the invitation.
        public let resourceShareInvitationArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceShareInvitationArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceShareInvitationArn = resourceShareInvitationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceShareInvitationArn
        }
    }

    public struct ListPendingInvitationResourcesResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// Information about the resources included the resource share.
        public let resources: [Resource]?

        public init(nextToken: String? = nil, resources: [Resource]? = nil) {
            self.nextToken = nextToken
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resources
        }
    }

    public struct ListPermissionsRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// Specifies the resource type for which to list permissions. For example, to list only permissions that apply to EC2 subnets, specify ec2:Subnet.
        public let resourceType: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceType: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceType
        }
    }

    public struct ListPermissionsResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// Information about the permissions.
        public let permissions: [ResourceSharePermissionSummary]?

        public init(nextToken: String? = nil, permissions: [ResourceSharePermissionSummary]? = nil) {
            self.nextToken = nextToken
            self.permissions = permissions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case permissions
        }
    }

    public struct ListPrincipalsRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The principals.
        public let principals: [String]?
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String?
        /// The type of owner.
        public let resourceOwner: ResourceOwner
        /// The Amazon Resource Names (ARN) of the resource shares.
        public let resourceShareArns: [String]?
        /// The resource type. Valid values: codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | license-manager:LicenseConfiguration I resource-groups:Group | rds:Cluster | route53resolver:ResolverRule
        public let resourceType: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, principals: [String]? = nil, resourceArn: String? = nil, resourceOwner: ResourceOwner, resourceShareArns: [String]? = nil, resourceType: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principals = principals
            self.resourceArn = resourceArn
            self.resourceOwner = resourceOwner
            self.resourceShareArns = resourceShareArns
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case principals
            case resourceArn
            case resourceOwner
            case resourceShareArns
            case resourceType
        }
    }

    public struct ListPrincipalsResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// The principals.
        public let principals: [Principal]?

        public init(nextToken: String? = nil, principals: [Principal]? = nil) {
            self.nextToken = nextToken
            self.principals = principals
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case principals
        }
    }

    public struct ListResourceSharePermissionsRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceShareArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceShareArn = resourceShareArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceShareArn
        }
    }

    public struct ListResourceSharePermissionsResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// The permissions associated with the resource share.
        public let permissions: [ResourceSharePermissionSummary]?

        public init(nextToken: String? = nil, permissions: [ResourceSharePermissionSummary]? = nil) {
            self.nextToken = nextToken
            self.permissions = permissions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case permissions
        }
    }

    public struct ListResourceTypesRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListResourceTypesResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// The shareable resource types supported by AWS RAM.
        public let resourceTypes: [ServiceNameAndResourceType]?

        public init(nextToken: String? = nil, resourceTypes: [ServiceNameAndResourceType]? = nil) {
            self.nextToken = nextToken
            self.resourceTypes = resourceTypes
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceTypes
        }
    }

    public struct ListResourcesRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The principal.
        public let principal: String?
        /// The Amazon Resource Names (ARN) of the resources.
        public let resourceArns: [String]?
        /// The type of owner.
        public let resourceOwner: ResourceOwner
        /// The Amazon Resource Names (ARN) of the resource shares.
        public let resourceShareArns: [String]?
        /// The resource type. Valid values: codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | license-manager:LicenseConfiguration I resource-groups:Group | rds:Cluster | route53resolver:ResolverRule
        public let resourceType: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: String? = nil, resourceArns: [String]? = nil, resourceOwner: ResourceOwner, resourceShareArns: [String]? = nil, resourceType: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resourceArns = resourceArns
            self.resourceOwner = resourceOwner
            self.resourceShareArns = resourceShareArns
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case principal
            case resourceArns
            case resourceOwner
            case resourceShareArns
            case resourceType
        }
    }

    public struct ListResourcesResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// Information about the resources.
        public let resources: [Resource]?

        public init(nextToken: String? = nil, resources: [Resource]? = nil) {
            self.nextToken = nextToken
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resources
        }
    }

    public struct Principal: AWSDecodableShape {
        /// The time when the principal was associated with the resource share.
        public let creationTime: Date?
        /// Indicates whether the principal belongs to the same AWS organization as the AWS account that owns the resource share.
        public let external: Bool?
        /// The ID of the principal.
        public let id: String?
        /// The time when the association was last updated.
        public let lastUpdatedTime: Date?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String?

        public init(creationTime: Date? = nil, external: Bool? = nil, id: String? = nil, lastUpdatedTime: Date? = nil, resourceShareArn: String? = nil) {
            self.creationTime = creationTime
            self.external = external
            self.id = id
            self.lastUpdatedTime = lastUpdatedTime
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case external
            case id
            case lastUpdatedTime
            case resourceShareArn
        }
    }

    public struct PromoteResourceShareCreatedFromPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceShareArn", location: .querystring(locationName: "resourceShareArn"))
        ]

        /// The ARN of the resource share to promote.
        public let resourceShareArn: String

        public init(resourceShareArn: String) {
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct PromoteResourceShareCreatedFromPolicyResponse: AWSDecodableShape {
        /// Indicates whether the request succeeded.
        public let returnValue: Bool?

        public init(returnValue: Bool? = nil) {
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case returnValue
        }
    }

    public struct RejectResourceShareInvitationRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the invitation.
        public let resourceShareInvitationArn: String

        public init(clientToken: String? = nil, resourceShareInvitationArn: String) {
            self.clientToken = clientToken
            self.resourceShareInvitationArn = resourceShareInvitationArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitationArn
        }
    }

    public struct RejectResourceShareInvitationResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Information about the invitation.
        public let resourceShareInvitation: ResourceShareInvitation?

        public init(clientToken: String? = nil, resourceShareInvitation: ResourceShareInvitation? = nil) {
            self.clientToken = clientToken
            self.resourceShareInvitation = resourceShareInvitation
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitation
        }
    }

    public struct Resource: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let arn: String?
        /// The time when the resource was associated with the resource share.
        public let creationTime: Date?
        /// The time when the association was last updated.
        public let lastUpdatedTime: Date?
        /// The ARN of the resource group. This value is returned only if the resource is a resource group.
        public let resourceGroupArn: String?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String?
        /// The status of the resource.
        public let status: ResourceStatus?
        /// A message about the status of the resource.
        public let statusMessage: String?
        /// The resource type.
        public let type: String?

        public init(arn: String? = nil, creationTime: Date? = nil, lastUpdatedTime: Date? = nil, resourceGroupArn: String? = nil, resourceShareArn: String? = nil, status: ResourceStatus? = nil, statusMessage: String? = nil, type: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.lastUpdatedTime = lastUpdatedTime
            self.resourceGroupArn = resourceGroupArn
            self.resourceShareArn = resourceShareArn
            self.status = status
            self.statusMessage = statusMessage
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case lastUpdatedTime
            case resourceGroupArn
            case resourceShareArn
            case status
            case statusMessage
            case type
        }
    }

    public struct ResourceShare: AWSDecodableShape {
        /// Indicates whether principals outside your AWS organization can be associated with a resource share.
        public let allowExternalPrincipals: Bool?
        /// The time when the resource share was created.
        public let creationTime: Date?
        /// Indicates how the resource share was created. Possible values include:    CREATED_FROM_POLICY - Indicates that the resource share was created from an AWS Identity and Access Management (AWS IAM) policy attached to a resource. These resource shares are visible only to the AWS account that created it. They cannot be modified in AWS RAM.    PROMOTING_TO_STANDARD - The resource share is in the process of being promoted. For more information, see PromoteResourceShareCreatedFromPolicy.    STANDARD - Indicates that the resource share was created in AWS RAM using the console or APIs. These resource shares are visible to all principals. They can be modified in AWS RAM.
        public let featureSet: ResourceShareFeatureSet?
        /// The time when the resource share was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the resource share.
        public let name: String?
        /// The ID of the AWS account that owns the resource share.
        public let owningAccountId: String?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String?
        /// The status of the resource share.
        public let status: ResourceShareStatus?
        /// A message about the status of the resource share.
        public let statusMessage: String?
        /// The tags for the resource share.
        public let tags: [Tag]?

        public init(allowExternalPrincipals: Bool? = nil, creationTime: Date? = nil, featureSet: ResourceShareFeatureSet? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, owningAccountId: String? = nil, resourceShareArn: String? = nil, status: ResourceShareStatus? = nil, statusMessage: String? = nil, tags: [Tag]? = nil) {
            self.allowExternalPrincipals = allowExternalPrincipals
            self.creationTime = creationTime
            self.featureSet = featureSet
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.owningAccountId = owningAccountId
            self.resourceShareArn = resourceShareArn
            self.status = status
            self.statusMessage = statusMessage
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case allowExternalPrincipals
            case creationTime
            case featureSet
            case lastUpdatedTime
            case name
            case owningAccountId
            case resourceShareArn
            case status
            case statusMessage
            case tags
        }
    }

    public struct ResourceShareAssociation: AWSDecodableShape {
        /// The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.
        public let associatedEntity: String?
        /// The association type.
        public let associationType: ResourceShareAssociationType?
        /// The time when the association was created.
        public let creationTime: Date?
        /// Indicates whether the principal belongs to the same AWS organization as the AWS account that owns the resource share.
        public let external: Bool?
        /// The time when the association was last updated.
        public let lastUpdatedTime: Date?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String?
        /// The name of the resource share.
        public let resourceShareName: String?
        /// The status of the association.
        public let status: ResourceShareAssociationStatus?
        /// A message about the status of the association.
        public let statusMessage: String?

        public init(associatedEntity: String? = nil, associationType: ResourceShareAssociationType? = nil, creationTime: Date? = nil, external: Bool? = nil, lastUpdatedTime: Date? = nil, resourceShareArn: String? = nil, resourceShareName: String? = nil, status: ResourceShareAssociationStatus? = nil, statusMessage: String? = nil) {
            self.associatedEntity = associatedEntity
            self.associationType = associationType
            self.creationTime = creationTime
            self.external = external
            self.lastUpdatedTime = lastUpdatedTime
            self.resourceShareArn = resourceShareArn
            self.resourceShareName = resourceShareName
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case associatedEntity
            case associationType
            case creationTime
            case external
            case lastUpdatedTime
            case resourceShareArn
            case resourceShareName
            case status
            case statusMessage
        }
    }

    public struct ResourceShareInvitation: AWSDecodableShape {
        /// The date and time when the invitation was sent.
        public let invitationTimestamp: Date?
        /// The ID of the AWS account that received the invitation.
        public let receiverAccountId: String?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String?
        /// The Amazon Resource Name (ARN) of the invitation.
        public let resourceShareInvitationArn: String?
        /// The name of the resource share.
        public let resourceShareName: String?
        /// The ID of the AWS account that sent the invitation.
        public let senderAccountId: String?
        /// The status of the invitation.
        public let status: ResourceShareInvitationStatus?

        public init(invitationTimestamp: Date? = nil, receiverAccountId: String? = nil, resourceShareArn: String? = nil, resourceShareInvitationArn: String? = nil, resourceShareName: String? = nil, senderAccountId: String? = nil, status: ResourceShareInvitationStatus? = nil) {
            self.invitationTimestamp = invitationTimestamp
            self.receiverAccountId = receiverAccountId
            self.resourceShareArn = resourceShareArn
            self.resourceShareInvitationArn = resourceShareInvitationArn
            self.resourceShareName = resourceShareName
            self.senderAccountId = senderAccountId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case invitationTimestamp
            case receiverAccountId
            case resourceShareArn
            case resourceShareInvitationArn
            case resourceShareName
            case senderAccountId
            case status
        }
    }

    public struct ResourceSharePermissionDetail: AWSDecodableShape {
        /// The ARN of the permission.
        public let arn: String?
        /// The date and time when the permission was created.
        public let creationTime: Date?
        /// The identifier for the version of the permission that is set as the default version.
        public let defaultVersion: Bool?
        /// The date and time when the permission was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the permission.
        public let name: String?
        /// The permission's effect and actions in JSON format. The effect indicates whether the actions are allowed or denied. The actions list the API actions to which the principal is granted or denied access.
        public let permission: String?
        /// The resource type to which the permission applies.
        public let resourceType: String?
        /// The identifier for the version of the permission.
        public let version: String?

        public init(arn: String? = nil, creationTime: Date? = nil, defaultVersion: Bool? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, permission: String? = nil, resourceType: String? = nil, version: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.defaultVersion = defaultVersion
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.permission = permission
            self.resourceType = resourceType
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case defaultVersion
            case lastUpdatedTime
            case name
            case permission
            case resourceType
            case version
        }
    }

    public struct ResourceSharePermissionSummary: AWSDecodableShape {
        /// The ARN of the permission.
        public let arn: String?
        /// The date and time when the permission was created.
        public let creationTime: Date?
        /// The identifier for the version of the permission that is set as the default version.
        public let defaultVersion: Bool?
        /// The date and time when the permission was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the permission.
        public let name: String?
        /// The type of resource to which the permission applies.
        public let resourceType: String?
        /// The current status of the permission.
        public let status: String?
        /// The identifier for the version of the permission.
        public let version: String?

        public init(arn: String? = nil, creationTime: Date? = nil, defaultVersion: Bool? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, resourceType: String? = nil, status: String? = nil, version: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.defaultVersion = defaultVersion
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.resourceType = resourceType
            self.status = status
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case defaultVersion
            case lastUpdatedTime
            case name
            case resourceType
            case status
            case version
        }
    }

    public struct ServiceNameAndResourceType: AWSDecodableShape {
        /// The shareable resource types.
        public let resourceType: String?
        /// The name of the AWS services to which the resources belong.
        public let serviceName: String?

        public init(resourceType: String? = nil, serviceName: String? = nil) {
            self.resourceType = resourceType
            self.serviceName = serviceName
        }

        private enum CodingKeys: String, CodingKey {
            case resourceType
            case serviceName
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key of the tag.
        public let key: String?
        /// The value of the tag.
        public let value: String?

        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case value
        }
    }

    public struct TagFilter: AWSEncodableShape {
        /// The tag key.
        public let tagKey: String?
        /// The tag values.
        public let tagValues: [String]?

        public init(tagKey: String? = nil, tagValues: [String]? = nil) {
            self.tagKey = tagKey
            self.tagValues = tagValues
        }

        private enum CodingKeys: String, CodingKey {
            case tagKey
            case tagValues
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String
        /// One or more tags.
        public let tags: [Tag]

        public init(resourceShareArn: String, tags: [Tag]) {
            self.resourceShareArn = resourceShareArn
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceShareArn
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String
        /// The tag keys of the tags to remove.
        public let tagKeys: [String]

        public init(resourceShareArn: String, tagKeys: [String]) {
            self.resourceShareArn = resourceShareArn
            self.tagKeys = tagKeys
        }

        private enum CodingKeys: String, CodingKey {
            case resourceShareArn
            case tagKeys
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateResourceShareRequest: AWSEncodableShape {
        /// Indicates whether principals outside your AWS organization can be associated with a resource share.
        public let allowExternalPrincipals: Bool?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The name of the resource share.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the resource share.
        public let resourceShareArn: String

        public init(allowExternalPrincipals: Bool? = nil, clientToken: String? = nil, name: String? = nil, resourceShareArn: String) {
            self.allowExternalPrincipals = allowExternalPrincipals
            self.clientToken = clientToken
            self.name = name
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case allowExternalPrincipals
            case clientToken
            case name
            case resourceShareArn
        }
    }

    public struct UpdateResourceShareResponse: AWSDecodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// Information about the resource share.
        public let resourceShare: ResourceShare?

        public init(clientToken: String? = nil, resourceShare: ResourceShare? = nil) {
            self.clientToken = clientToken
            self.resourceShare = resourceShare
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShare
        }
    }
}
